<!--[if lte IE 6]>
    <script type="text/javascript" src="__PUBLIC__/js/bootstrap-ie.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.bgiframe.min.js"></script>
    
    <script type="text/javascript">
    (function ($) {
      $(document).ready(function() {
	    $('.dropdown-menu').bgiframe();
        if ($.isFunction($.bootstrapIE6)) $.bootstrapIE6($(document));
      });
    })(jQuery);
    </script><![endif]-->
<script>
$(function(){
	$("#all").click(function(){ 
		var ch = $(this).attr('checked');
		ch = ch ? true : false;
		$("input[name='id[]']").attr("checked",ch); 
	}); 
	$('#delete').click(function(){
		if(confirm("删除将不可恢复，你确定要删除吗?")){
		 	$('#estateform').attr('action','{url('estate/del')}').submit();
		}		
	});
	$('#rented').click(function(){		
		$('#estateform').attr('action','{url('estate/rented',array('rented'=>1) )}').submit();
			
	});
	$('#norented').click(function(){		
		$('#estateform').attr('action','{url('estate/rented',array('rented'=>0) )}').submit();
			
	});
	$('#refresh').click(function(){		
		$('#estateform').attr('action','{url('estate/refresh')}').submit();
			
	});
	$('#status').click(function(){		
		$('#estateform').attr('action','{url('estate/status')}').submit();
			
	});
	
	//个人模块
	$('#user_delete').click(function(){
		if(confirm("删除将不可恢复，你确定要删除吗?")){
		 	$('#estateform').attr('action','{url('userestate/del')}').submit();
		}		
	});
	$('#user_rented').click(function(){		
		$('#estateform').attr('action','{url('userestate/rented',array('rented'=>1) )}').submit();
			
	});
	$('#user_norented').click(function(){		
		$('#estateform').attr('action','{url('userestate/rented',array('rented'=>0) )}').submit();
			
	});
	$('#user_refresh').click(function(){		
		$('#estateform').attr('action','{url('userestate/refresh')}').submit();
			
	});
	
});
</script>
</body>
</html>
